//
// Created by Administrator on 2019/6/6 0006.
//

#ifndef FFMPEGDEMO_JAVACALLBACK_H
#define FFMPEGDEMO_JAVACALLBACK_H


#include <jni.h>

class JavaCallback {

public:
    JavaCallback(JavaVM *_javaVM, JNIEnv *_env, jobject &_jobj);

    ~JavaCallback();

    void onError(int thread, int code);

    void onPrepare(int thread);

    void onProgress(int thread, int progress);

private:
    JavaVM *javaVM;
    JNIEnv *env;
    jobject jobj;
    jmethodID jmid_prepare;
    jmethodID jmid_error;
    jmethodID jmid_progress;
};


#endif //FFMPEGDEMO_JAVACALLBACK_H
